<?php 

App::uses('Component', 'Controller');

class FlashComponent extends Component {
	public $components = array('Session');

    public function success($message, $params = array()) {
        $this->Session->setFlash($message, 'default', $params, 'success');
    }

    public function warning($message, $params = array()) {
        $this->Session->setFlash($message, 'default', $params, 'warning');
    }

    public function info($message, $params = array()) {
        $this->Session->setFlash($message, 'default', $params, 'info');
    }

    public function error($message, $params = array()) {
        $this->Session->setFlash($message, 'default', $params, 'error');
    }
}